<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Media Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
  </head>
  <body>
    <a name="//apple_ref/swift/Class/Media" class="dashAnchor"></a>
    <a title="Media Class Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">MediaBrowser Docs</a> (100% documented)</p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">MediaBrowser Reference</a>
        <img id="carat" src="../img/carat.png" />
        Media Class Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/Media.html">Media</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/MediaBrowser.html">MediaBrowser</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/MediaCaptionView.html">MediaCaptionView</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Extensions/UIImage.html">UIImage</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/MediaBrowserDelegate.html">MediaBrowserDelegate</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>Media</h1>
              <div class="declaration">
                <div class="language">
                  <pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">Media</span><span class="p">:</span> <span class="kt">NSObject</span></code></pre>

                </div>
              </div>
            <p>Media is object for photo and video</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vC12MediaBrowser5Media7captionSS"></a>
                    <a name="//apple_ref/swift/Property/caption" class="dashAnchor"></a>
                    <a class="token" href="#/s:vC12MediaBrowser5Media7captionSS">caption</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>caption</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">caption</span> <span class="o">=</span> <span class="s">""</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vC12MediaBrowser5Media10emptyImageSb"></a>
                    <a name="//apple_ref/swift/Property/emptyImage" class="dashAnchor"></a>
                    <a class="token" href="#/s:vC12MediaBrowser5Media10emptyImageSb">emptyImage</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>emptyImage</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">emptyImage</span> <span class="o">=</span> <span class="kc">true</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vC12MediaBrowser5Media7isVideoSb"></a>
                    <a name="//apple_ref/swift/Property/isVideo" class="dashAnchor"></a>
                    <a class="token" href="#/s:vC12MediaBrowser5Media7isVideoSb">isVideo</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>isVideo</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">isVideo</span> <span class="o">=</span> <span class="kc">false</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vC12MediaBrowser5Media15underlyingImageGSqCSo7UIImage_"></a>
                    <a name="//apple_ref/swift/Property/underlyingImage" class="dashAnchor"></a>
                    <a class="token" href="#/s:vC12MediaBrowser5Media15underlyingImageGSqCSo7UIImage_">underlyingImage</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>underlyingImage</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">underlyingImage</span><span class="p">:</span> <span class="kt">UIImage</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Init"></a>
                <a name="//apple_ref/swift/Section/Init" class="dashAnchor"></a>
                <a href="#/Init">
                  <h3 class="section-name">Init</h3>
                </a>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC12MediaBrowser5MediacFT_S0_"></a>
                    <a name="//apple_ref/swift/Method/init()" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC12MediaBrowser5MediacFT_S0_">init()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>init</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">override</span> <span class="nf">init</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC12MediaBrowser5MediacFT5imageCSo7UIImage_S0_"></a>
                    <a name="//apple_ref/swift/Method/init(image:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC12MediaBrowser5MediacFT5imageCSo7UIImage_S0_">init(image:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>init with image</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">image</span><span class="p">:</span> <span class="kt">UIImage</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC12MediaBrowser5MediacFT5imageCSo7UIImage7captionSS_S0_"></a>
                    <a name="//apple_ref/swift/Method/init(image:caption:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC12MediaBrowser5MediacFT5imageCSo7UIImage7captionSS_S0_">init(image:caption:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>init with image and caption</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">image</span><span class="p">:</span> <span class="kt">UIImage</span><span class="p">,</span> <span class="nv">caption</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC12MediaBrowser5MediacFT3urlV10Foundation3URL7captionSS_S0_"></a>
                    <a name="//apple_ref/swift/Method/init(url:caption:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC12MediaBrowser5MediacFT3urlV10Foundation3URL7captionSS_S0_">init(url:caption:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>init with image url and caption</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">url</span><span class="p">:</span> <span class="kt">URL</span><span class="p">,</span> <span class="nv">caption</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC12MediaBrowser5MediacFT3urlV10Foundation3URL_S0_"></a>
                    <a name="//apple_ref/swift/Method/init(url:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC12MediaBrowser5MediacFT3urlV10Foundation3URL_S0_">init(url:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>init with image url</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">url</span><span class="p">:</span> <span class="kt">URL</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC12MediaBrowser5MediacFT5assetCSo7PHAsset10targetSizeVSC6CGSize_S0_"></a>
                    <a name="//apple_ref/swift/Method/init(asset:targetSize:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC12MediaBrowser5MediacFT5assetCSo7PHAsset10targetSizeVSC6CGSize_S0_">init(asset:targetSize:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>init with PHAsset and targetSize</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">asset</span><span class="p">:</span> <span class="kt">PHAsset</span><span class="p">,</span> <span class="nv">targetSize</span><span class="p">:</span> <span class="kt">CGSize</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC12MediaBrowser5MediacFT8videoURLV10Foundation3URL_S0_"></a>
                    <a name="//apple_ref/swift/Method/init(videoURL:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC12MediaBrowser5MediacFT8videoURLV10Foundation3URL_S0_">init(videoURL:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>init with video URL</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">videoURL</span><span class="p">:</span> <span class="kt">URL</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Video"></a>
                <a name="//apple_ref/swift/Section/Video" class="dashAnchor"></a>
                <a href="#/Video">
                  <h3 class="section-name">Video</h3>
                </a>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vC12MediaBrowser5Media8videoURLGSqV10Foundation3URL_"></a>
                    <a name="//apple_ref/swift/Property/videoURL" class="dashAnchor"></a>
                    <a class="token" href="#/s:vC12MediaBrowser5Media8videoURLGSqV10Foundation3URL_">videoURL</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Set video URL</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">videoURL</span><span class="p">:</span> <span class="kt">URL</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Photo%20Protocol%20Methods"></a>
                <a name="//apple_ref/swift/Section/Photo Protocol Methods" class="dashAnchor"></a>
                <a href="#/Photo%20Protocol%20Methods">
                  <h3 class="section-name">Photo Protocol Methods</h3>
                </a>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC12MediaBrowser5Media21unloadUnderlyingImageFT_T_"></a>
                    <a name="//apple_ref/swift/Method/unloadUnderlyingImage()" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC12MediaBrowser5Media21unloadUnderlyingImageFT_T_">unloadUnderlyingImage()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Release if we can get it again from path or url</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">unloadUnderlyingImage</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC12MediaBrowser5Media16cancelAnyLoadingFT_T_"></a>
                    <a name="//apple_ref/swift/Method/cancelAnyLoading()" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC12MediaBrowser5Media16cancelAnyLoadingFT_T_">cancelAnyLoading()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Cancel loading</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">cancelAnyLoading</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2017 <a class="link" href="https://github.com/younatics/MediaBrowser" target="_blank" rel="external">Seungyoun Yi</a>. All rights reserved. (Last updated: 2017-09-10)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
